package io.bluerain.javafx.css;

import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;

/**
 * Created by foredawn on 15-8-28.
 * javafx 对CSS的应用
 */
public class CssTest extends Application {


    @Override
    public void start(Stage primaryStage) throws Exception {
        Rectangle rect = new Rectangle(250, 250);
        rect.setId("rect");
        Group root = new Group();
        root.getChildren().add(rect);
        Scene scene = new Scene(root, 450, 450);
        scene.getStylesheets().add("javafx.css");
        primaryStage.setScene(scene);
        primaryStage.show();

    }
}
